2025-03-24
About healthiar
Examples
Example: attribute_health() with AR
Example: iteration with attribute_health() and AR
Example: compare()
Post-healthiar workflow
Equation for absolute risk
Discussion
healthiarhealthiar 1/3healthiar is an R package (= collection of R functions)
The healthiar functions allow you to quantify and monetize the health impacts of environmental stressors (air pollution & noise)
Let’s jump right in, with an example of a healthiar R function call
healthiar 2/3Selection of healthiar core family members (functions)
attribute_health() to env. exposure with either relative or absolute risksummarize_uncertainty() Monte Carlo simulationattribute_mod() modify an existing assessmentcompare() two scenariosmonetize() health impactscba() cost-benefit analysisprepare_exposure() from spatial exposure data and geographic units datahealthiar 3/3Installation & getting started using the README file
README file of the healthiar R package
healthiar in RStudioLanding page of the healthiar package in RStudio, where you find the package vignettes and function documentation.
Any arguments without a = symbol after the name have no default and must be user-specified
For a more detailed function documentation walk through see the [Appendix]
attribute_health() with ARattribute_health() with ARGoal: attribute cases of high annoyance (HA) to noise exposure
Every attribute output initially consists of two main lists (“folders”), and additional sub-lists (“sub-folders”)
health_main contains the main results
health_detailed contains more detailed results and additional information
impact_raw contains detailed results
input_table contains the input data as entered in the function call
input_args = function arguments (list) as used by R in the background
The output tables are in the tibble format, which is a modern version of the original data frame, and can be used like a data frame
Tip
Different ways exist and you might have a personal preference!
Go to the Environment tab in RStudio …
… and click on a variable to “open” it.
Alternatively, you can use
View(results_noise_ha), which has the same effect.
results_noise_ha$health_main$impact_rounded
Note: after typing the $ sign you can see all available options by pressing the tab key and use the arrows & tab keys to select an option (or alternatively use the mouse)
| approach_risk | impact |
|---|---|
| absolute_risk | 174231.8 |
| exposure_dimension | exp | pop_exp | impact |
|---|---|---|---|
| 1 | 57.5 | 387500 | 49674.594 |
| 2 | 62.5 | 286000 | 50788.595 |
| 3 | 67.5 | 191800 | 46813.105 |
| 4 | 72.5 | 72200 | 23657.232 |
| 5 | 77.5 | 7700 | 3298.314 |
attribute_health()attribute_health()Goal: attribute HA cases to noise exposure in multiple geographic units, such as municipalities, provinces, countries, …
results_noise_ha_iteration <- attribute_health(
approach_risk = "absolute_risk",
geo_id_disaggregated = c("Asker", "Baerum", "Oslo", "Lorenskok", "Lillestrom",
"Raelingen", "Nordre Follo"),
geo_id_aggregated = rep("Oslo & agglomeration", 7),
erf_eq_central = "78.927-3.1162*c+0.0342*c^2",
exp_central = rep(list(data_noise$exp_cat), 7),
pop_exp = list(data_noise$pop_asker,
data_noise$pop_baerum,
data_noise$pop_oslo,
data_noise$pop_lorenskog,
data_noise$pop_lillestrom,
data_noise$pop_raelingen,
data_noise$pop_nordre_follo)
)Tip
For iterations, enter geo unit-specific inputs as a list
Feed unique geo ID’s as a vector to the geo_id_disaggregated argument (e.g. municipality names)
Optional: aggregate geo unit-specific results by providing higher-level ID’s (e.g. region names) to the geo_id_aggregated argument (as a vector)
compare()compare()Goal: comparison of two scenarios
attribute_health() to calculate burden of scenarios A & Bcompare() to compare scenarios A & B| impact | impact_rounded | impact_1 | impact_2 | bhd | exp_1 | exp_2 | rr_conc_1 | rr_conc_2 |
|---|---|---|---|---|---|---|---|---|
| 773.5564 | 774 | 1050.86 | 277.304 | 25000 | 8.85 | 6 | 1.043879 | 1.011217 |
healthiar workflowVisualization is out of scope of healthiar. You can visualize in
ggplot2 package (online book by the creator)